home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <html><head><title>Or-Operator [Runtime]</title><meta name="filename" content="text/sbasic/common/03060500"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
-
- p.P1{
- }
- p.P2{
- }
- span.T1{
- font-weight:bold;}
- </style></head><body>
-
-
- <help:to-be-embedded Eid="or" xmlns:help="http://openoffice.org/2000/help">
- <p class="Head1"><help:link Id="66418">Or-Operator [Runtime]</help:link></p>
- <p class="Paragraph">Performs a logical OR disjunction on two expressions.</p>
- </help:to-be-embedded>
- <p class="Paragraph"><span class="T1">Syntax</span>:</p>
- <p class="Paragraph">Result = Expression1 Or Expression2 <help:key-word value="Or" tag="kw66418_1" xmlns:help="http://openoffice.org/2000/help"/></p>
- <p class="Paragraph"><span class="T1">Parameter</span>:</p>
- <p class="Paragraph">Result: Any numeric variable that contains the result of the disjunction.</p>
- <p class="Paragraph">Expression1, Expression2: Any numeric expressions to be compared.</p>
- <p class="Paragraph">A logical OR disjunction of two boolean expressions returns True if at least one comparison expression is True.</p>
- <p class="Paragraph">A bit-wise comparison sets a bit in the result if the corresponding bit is set in at least one of the two expressions.</p>
- <p class="P2">Example:</p>
- <p class="PropText">Sub ExampleOr</p>
- <p class="PropText">Dim vA as Variant, vB as Variant, vC as Variant, vD as Variant</p>
- <p class="PropText">Dim vOut as Variant</p>
- <p class="PropText">vA = 10: vB = 8: vC = 6: vD = Null</p>
- <p class="PropText">vOut = vA > vB Or vB > vC <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM -1</p>
- <p class="PropText">vOut = vB > vA Or vB > vC <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM -1</p>
- <p class="PropText">vOut = vA > vB Or vB > vD <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM -1</p>
- <p class="PropText">vOut = (vB > vD Or vB > vA) REM -1</p>
- <p class="PropText">vOut = vB Or vA <text:s text:c="10" xmlns:text="http://openoffice.org/2000/text"/>REM 10</p>
- <p class="PropText">End Sub</p>
- </body></html>